package com.jtech.together.util;

import android.app.Activity;
import android.os.Bundle;

import com.jtech.together.view.activity.PhotoGalleryActivity;

import java.util.ArrayList;

/**
 * 图片浏览方法
 * Created by wuxubaiyang on 2017/5/11.
 */

public class ImageGallery {
    /**
     * 浏览图片
     *
     * @param imageList
     * @param index
     */
    public static void gallery(Activity activity, ArrayList<String> imageList, int index) {
        Bundle bundle = new Bundle();
        bundle.putStringArrayList(PhotoGalleryActivity.KEY_PHOTO_LIST, imageList);
        bundle.putInt(PhotoGalleryActivity.KEY_PHOTO_INDEX, index);
        ActivityJump.build(activity, PhotoGalleryActivity.class)
                .addBundle(bundle)
                .jump();
    }
}